package com.gegong.imr.client.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "imr.center")
@Data
public class ImrCenterConfig {

    private String apiRoot;


    private static final String CLIENT_API_ROOT = "/api/task/client/";

    /**
     * 获取客户端当前任务
     *
     * @return
     */
    public String urlForGetClientCurrentTask() {
        return apiRoot + CLIENT_API_ROOT + "get";
    }


    /**
     * 上传客户端信息
     *
     * @return
     */
    public String urlForSaveClient() {
        return apiRoot + CLIENT_API_ROOT + "save";
    }

    /**
     * 上传客户端状态
     *
     * @return
     */
    public String urlForReportClientStatus() {
        return apiRoot + CLIENT_API_ROOT + "state";
    }
    /**
     * 上报任务结果
     *
     * @return
     */
    public String urlForReportTaskState() {
        return apiRoot + CLIENT_API_ROOT + "result";
    }

}
